import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { Upload, message, Button, Icon, Radio, Input, Col, Select } from 'antd';

import styles from './index.module.less';

export default class CompanyMessage extends Component {
  state = {
    value: 1,
    value2: 1,
    value3: 1,
    size: 'default',
  }
  handleSizeChange = e => {
    this.setState({ size: e.target.value });
  }
  onChange = e => {
    console.log('radio checked', e.target.value);
    this.setState({
      value: e.target.value,
    });
  }
  render() {
    function handleChange1(value) {
      console.log(`selected ${value}`);
    }
    function handleChange2(value) {
      console.log(`selected ${value}`);
    }
    function handleChange3(value) {
      console.log(`selected ${value}`);
    }
    function handleChange4(value) {
      console.log(`selected ${value}`);
    }
    function handleChange5(value) {
      console.log(`selected ${value}`);
    }
    function handleChange6(value) {
      console.log(`selected ${value}`);
    }

    return (
      <div className={styles.CompanyMessageBox}>
        <div style={{ color: '#1e88e5' }}>基本信息</div>
        <div className={styles.Box} style={{ borderBottom: '2px solid #e1e1e1' }}>
          <div className={styles.box}>
            <span className={styles.s1}>公司名称</span>
            <input type="text" className={styles.a1}/>
            <span style={{ color: '#ff0000', marginLeft: 10 }}>*请输入在工商局注册的公司全称</span>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>经营年限</span>
            <Select defaultValue="1年" style={{ width: 224 }} onChange={handleChange1}>
              <Select.Option value="1年">1年</Select.Option>
              <Select.Option value="2年">2年</Select.Option>
              <Select.Option value="3年">3年</Select.Option>
            </Select>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>企业规模</span>
            <Select defaultValue="100" style={{ width: 224 }} onChange={handleChange2}>
              <Select.Option value="100">100人以下</Select.Option>
              <Select.Option value="200">200人以下</Select.Option>
              <Select.Option value="300">300人以下</Select.Option>
            </Select>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>我的部门</span>
            <input type="text" className={styles.a1}/>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>我的职位</span>
            <input type="text" className={styles.a1}/>
          </div>
        </div>
        <div style={{ color: '#1e88e5', marginTop: 20 }}>业务信息</div>
        <div className={styles.Box} style={{ borderBottom: '2px solid #e1e1e1' }}>
          <div className={styles.box}>
            <span className={styles.s1}>主营行业</span>
            <Select defaultValue="塑料" style={{ width: 224 }} onChange={handleChange3}>
              <Select.Option value="钢铁">钢铁</Select.Option>
              <Select.Option value="塑料">塑料</Select.Option>
              <Select.Option value="纸类">纸类</Select.Option>
            </Select>
            <span style={{ color: '#ff0000', marginLeft: 10 }}>添加</span>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>主营产品</span>
            <input type="text" className={styles.a1} placeholder=" 可写多个，以“、”号间隔区分"/>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>企业规模</span>
            <Radio.Group onChange={this.onChange} value={this.state.value}>
              <Radio value={1}>企业单位</Radio>
              <Radio value={2}>事业单位</Radio>
              <Radio value={3}>个体经营</Radio>
            </Radio.Group>
          </div>
          <div className={styles.box}>
            <span style={{ marginRight: 80 }}>网址</span>
            <input className={styles.a1} style={{ width: 726 }} type="text" placeholder='https://account.console.aliyun.com/?spm=5176.8142029.388261.306.36026d3ecLFP0C#/basicInfo'/>
          </div>
        </div>
        <div style={{ color: '#1e88e5', marginTop: 20 }}>联系信息</div>
        <div className={styles.Box}>
          <div className={styles.box}>
            <span className={styles.s1}>国际/地区</span>
            <Select defaultValue="中国" style={{ width: 224 }} onChange={handleChange4}>
              <Select.Option value="美国">美国</Select.Option>
              <Select.Option value="中国">中国</Select.Option>
              <Select.Option value="法国">法国</Select.Option>
            </Select>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>所在地区</span>
            <Select defaultValue="浙江省" style={{ width: 112 }} onChange={handleChange5}>
              <Select.Option value="浙江省">浙江省</Select.Option>
              <Select.Option value="辽宁省">辽宁省</Select.Option>
              <Select.Option value="江苏省">江苏省</Select.Option>
            </Select>
            <Select defaultValue="杭州市" style={{ width: 112, marginLeft: 6 }} onChange={handleChange6}>
              <Select.Option value="杭州市">杭州市</Select.Option>
              <Select.Option value="宁波市">宁波市</Select.Option>
              <Select.Option value="台州市">台州市</Select.Option>
            </Select>
          </div>
          <div className={styles.box}>
            <span className={styles.s1}>街道地址</span>
            <input className={styles.a1} style={{ width: 726 }} type="text" />
          </div>
          <div className={styles.box}>
            <span style={{ marginRight: 46 }}>手机/固话</span>
            <input type="text" className={styles.a1} />
          </div>
          <div className={styles.box}>
            <span style={{ marginRight: 80 }}>传真</span>
            <input type="text" className={styles.a1}/>
          </div>
          <div className={styles.statement}>
            <Radio>
            我声明，此页面所填写内容均真实有效，特别是经营地址为最新可联系到的地址，
            同时可以作为行政机关和司法机关送达<br/>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;法律文件的地址。如果上述地址信息有误，
            愿意承担由此带来的平台处罚（处理细则）、行政监管和司法诉讼风险。
            </Radio>
          </div>
          <div className={styles.submitBtn}>
            <Button type="primary">确认提交</Button>
          </div>
        </div>
      </div>
    );
  }
}

